<template>
    <div class="paySuccess whitepage page">
        <div class="pay-title">
            <div class="pay-money">
                <span class="pay-money-font">￥</span>
                <span class="pay-money-font2">{{money}}</span>
            </div>
            <div class="pay-money-text">支付成功</div>
        </div>
        <div class="payInfo">
            <ul class="payInfo-ul">
                <li class="disblock">
                    <span class="payInfo-text-left">车牌号码</span>
                    <span class="payInfo-text-right">{{carNo}}</span>
                </li>
                <li class="">
                    <span class="payInfo-text-left">停车时长</span>
                    <span class="payInfo-text-right">{{time}}</span>
                </li>
                <li class="disblock">
                    <span class="payInfo-text-left">账单类型</span>
                    <span class="payInfo-text-right">停车费</span>
                </li>
                <li class="disblock">
                    <span class="payInfo-text-left">入场时间</span>
                    <span class="payInfo-text-right">{{entryTime}}</span>
                </li>
                <li class="disblock">
                    <span class="payInfo-text-left">交易时间</span>
                    <span class="payInfo-text-right">{{payTime}}</span>
                </li>
                <li class="disblock">
                    <span class="payInfo-text-left">应离场时间</span>
                    <span class="payInfo-text-right">{{outTime}}</span>
                </li>
            </ul>
            <i class="payInfo-line"></i>
        </div>
        <div class="payInfo">
            <ul class="payInfo-ul">
                <li class="">
                    <span class="payInfo-text-left">支付方式</span>
                    <span class="payInfo-text-right">微信</span>
                </li>
                <li class="disblock">
                    <span class="payInfo-text-left">订单号</span>
                    <span class="payInfo-text-right">{{orderNo}}</span>
                </li>
            </ul>
        </div>
        <p class="cs-img" @click="callPhone('0757-86678397')">
        </p>
    </div>
</template>

<script>

    import {Panel, Icon, Toast} from 'vant';
    import "./css/parking.css";
    import Cookies from 'js-cookie'

    export default {
        name: "paySuccess",
        data() {
            return {
                orderNo: "",
                entryTime: "",
                payTime: "",
                money: "",
                outTime: "",
                carNo: "",
                time:""
            }
        },
        mounted() {
            var orderNo = this.$route.query.orderNo;
            this.$api.parking.orderDetail({orderNo: orderNo})
                .then((res) => {
                    let data = res.data;
                    this.orderNo = orderNo;
                    this.entryTime = data.entryTime;
                    this.payTime = data.payTime;
                    this.money = data.money;
                    this.outTime = data.outTime;
                    this.carNo = data.carNo;
                    this.time = data.time;
                })
        },
        methods: {
            callPhone (phoneNumber) {
                window.location.href = 'tel://' + phoneNumber
            }
        }
    }
</script>

<style lang="less">
    .paySuccess {
        height: 100%;

        .padding-b15 {
            padding-bottom: 15px;
        }

        .noteStyle {
            font-size: 15px;
            color: #ff5f5d;
        }

        .taR {
            text-align: right;
        }

        .taC {
            text-align: center;
        }

        .pay-title {
            background: #FFFFFF;
        }

        .pay-money {
            font-size: 32px;
            text-align: center;
            padding-top: 2.5rem;
            position: relative;
        }

        .pay-money-font {
            color: #3c3c3c;
            font-size: 18px;
        }

        .pay-money-font2 {
            color: #3c3c3c;
        }

        .pay-money-text {
            font-size: 14px;
            text-align: center;
            margin-top: 0.5rem;
            padding-bottom: 1.5rem;
            color: #72737c;
        }

        .payInfo {
            background-color: #fff;
            /*max-height: 8rem;*/
            overflow-y: auto;
        }

        .payInfo-ul {
            margin: 0;
            padding: 0;
            margin: 0 0 0 1.3rem;
        }

        .payInfo-ul li {
            list-style-type: none;
            position: relative;
            font-size: 1.4rem;
            margin-bottom: 0.92rem;
        }

        .disblock {
            display: block;
        }

        .payInfo-text-left {
            color: #72737c;
            -o-text-overflow: ellipsis;
            text-overflow: ellipsis;
            width: 4.6rem;
            white-space: nowrap;
            overflow: hidden;
            text-align: left;
        }

        .payInfo-text-right {
            position: absolute;
            right: 1.25rem;
            color: #3c3c3c;
            text-align: right;
        }

        .payInfo-line {
            display: block;
            width: calc(100% - 2.5rem);
            height: 1px;
            background-color: #ecedf2;
            margin: 0 1.25rem 0.83rem 1.25rem;
        }

        .cs-img {
            background: url(img/cs.png);
            margin: auto;
            margin-top: 2.52rem;
            text-align: center;
            font-size: 1.24rem;
            color: #898992;
            width: 10rem;
            height: 3.5rem;
            background-size: cover;
        }
    }
</style>